package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;

class zyn {
   private static final com.aspose.cells.b.c.a.za a = new com.aspose.cells.b.c.a.za(new String[]{"#REF", "#REF!"});

   static String a(int var0, WorksheetCollection var1, int var2, HashMap var3) {
      zur var4 = var1.q().b(var0);
      int var5 = var4.a & '\uffff';
      int var6 = var4.b & '\uffff';
      int var7 = var4.c & '\uffff';
      if (var5 == var1.u()) {
         if (var6 >= 0 && var6 < var1.getCount()) {
            String var14 = var1.get(var6).getName();
            if (var6 != var7) {
               var14 = var14 + ":" + var1.get(var7).getName();
            }

            if (var14.indexOf(39) != -1) {
               var14 = "'" + com.aspose.cells.b.a.zv.a(var14, "'", "''") + "'";
               return var14;
            } else {
               if (zakq.b(var14)) {
                  var14 = "'" + var14 + "'";
               }

               return var14;
            }
         } else {
            return "#REF";
         }
      } else {
         StringBuilder var8 = new StringBuilder();
         zbqg var9 = var1.v().a(var5);
         if (var9.a() == 5) {
            return "";
         } else if (var9.c() != null && var6 >= 0 && var6 < var9.c().length) {
            String var10 = var9.c()[var6];
            boolean var11 = true;
            var8.append('\'');
            switch(var2) {
            case 1:
               var8.append('[');
               var8.append(com.aspose.cells.b.a.zr.a(var3.get(var5)));
               break;
            default:
               String var12 = var9.a(var1.n());
               if (var2 == 2 && var1.n().h() != null && var12.startsWith(var1.n().h())) {
                  String var13 = var12.substring(var1.n().h().length());
                  if (com.aspose.cells.b.a.zv.b(var13, var10)) {
                     var11 = false;
                  }
               }

               if (var11) {
                  var12 = var12.replace('/', '\\');
                  int var15 = var12.lastIndexOf(92);
                  if (var15 != -1) {
                     var8.append(var12.substring(0, 0 + var15 + 1));
                     var8.append('[');
                     var8.append(var12.substring(var15 + 1));
                  } else if (var12.length() > 2 && var12.charAt(1) == ':') {
                     var8.append(var12.substring(0, 3));
                     var8.append('[');
                     var8.append(var12.substring(3));
                  } else {
                     var8.append('[');
                     var8.append(var12);
                  }
               }
            }

            if (var11) {
               var8.append(']');
            }

            if (var10.indexOf(39) != -1) {
               var10 = com.aspose.cells.b.a.zv.a(var10, "'", "''");
            }

            var8.append(var10);
            if (var6 != var7) {
               var8.append(':');
               var10 = var9.c()[var7];
               if (var10.indexOf(39) != -1) {
                  var10 = com.aspose.cells.b.a.zv.a(var10, "'", "''");
               }

               var8.append(var10);
            }

            var8.append('\'');
            return com.aspose.cells.b.a.zr.a(var8);
         } else {
            return "#REF";
         }
      }
   }

   static String a(String var0) {
      var0 = com.aspose.cells.b.a.zv.a(var0, "'", "''");
      return var0;
   }

   static int a(String var0, char var1) {
      label28:
      for(int var2 = var0.length() - 1; var2 >= 0; --var2) {
         switch(var0.charAt(var2)) {
         case '"':
         case '\'':
            char var3 = var0.charAt(var2);
            --var2;

            while(true) {
               if (var2 < 0 || var0.charAt(var2) == var3) {
                  continue label28;
               }

               --var2;
            }
         default:
            if (var0.charAt(var2) == var1) {
               return var2;
            }
         }
      }

      return -1;
   }

   static String b(String var0) {
      String var1 = var0;
      if (var0.charAt(0) == '\'' && var0.charAt(var0.length() - 1) == '\'') {
         var1 = var0.substring(1, 1 + (var0.length() - 2));
         var1 = com.aspose.cells.b.a.zv.a(var1, "''", "'");
      }

      return var1;
   }

   static int[] a(WorksheetCollection var0, String var1) {
      if (var1.length() == 0) {
         return var0.v().a(var0);
      } else {
         var1 = b(var1);
         int var2 = -1;
         int var3 = -1;
         int var4 = var0.u();
         boolean var5 = true;
         String var6 = var1.toUpperCase();
         int var15;
         switch(a.a(var1)) {
         case 0:
         case 1:
            var3 = -1;
            var2 = -1;
            var15 = var0.q().f(var4, 65535, 65535);
            if (var15 == -1) {
               var15 = var0.q().b(var4, 65535, 65535);
            }

            return new int[]{var15, var4, var2, var3};
         default:
            Object var7 = var0.d().get(var6);
            if (var7 != null) {
               int[] var16 = (int[])((int[])var7);
               var2 = var3 = var16[0];
               var15 = var16[1];
            } else {
               int var8 = var1.lastIndexOf(91);
               if (var8 != -1) {
                  String var17 = null;
                  int var18 = var1.lastIndexOf(93);
                  if (var8 != 0) {
                     var17 = var1.substring(0, 0 + var8) + var1.substring(var8 + 1, var8 + 1 + (var18 - var8 - 1));
                  } else {
                     var17 = var1.substring(1, 1 + (var18 - 1));
                  }

                  var1 = var1.substring(var18 + 1);
                  int[] var20 = a(var0, var17, var1, true);
                  var4 = var20[0];
                  var15 = var20[1];
               } else {
                  int var9 = var1.indexOf(":");
                  var3 = -1;
                  var2 = -1;
                  boolean var10 = false;
                  boolean var11 = true;
                  if (var9 != -1 && var9 + 1 < var1.length() && var1.charAt(var9 + 1) != '\\' && var1.charAt(var9 + 1) != '/') {
                     String[] var21 = com.aspose.cells.b.a.zv.d(var6, ':');
                     if (var21.length != 2) {
                        throw new CellsException(5, "Invalid formula.");
                     }

                     boolean var13 = false;

                     for(int var19 = 0; var19 < var0.getCount(); ++var19) {
                        String var14 = var0.get(var19).getName().toUpperCase();
                        if (com.aspose.cells.b.a.zv.b(var14, var21[0])) {
                           var10 = true;
                           var2 = var19;
                        } else if (com.aspose.cells.b.a.zv.b(var14, var21[1])) {
                           var13 = true;
                           var3 = var19;
                           break;
                        }
                     }

                     if (!var10 || !var13 || var3 < var2) {
                        throw new CellsException(5, "Invalid formula.");
                     }

                     var15 = var0.q().f(var4, var2, var3);
                     if (var15 == -1) {
                        var15 = var0.q().b(var4, var2, var3);
                     }
                  } else {
                     int[] var12 = a((WorksheetCollection)var0, (String)var1, (String)null, false);
                     var4 = var12[0];
                     var15 = var12[1];
                  }
               }
            }

            return new int[]{var15, var4, var2, var3};
         }
      }
   }

   private static int[] a(WorksheetCollection var0, String var1, String var2, boolean var3) {
      int var4 = 0;
      int var5 = 0;
      String var6 = com.aspose.cells.a.c.zt.b(var1);
      zbqf var7 = var0.v();
      if (var0.n().getFileName() != null && var0.n().getFileName().endsWith(var6)) {
         var4 = var0.u();
         var5 = var0.q().a(var4, 65534, 65534, true);
         return new int[]{var4, var5};
      } else {
         String var8 = var1;
         var1 = zbqg.a(var1, 0);
         boolean var9 = false;
         zbqg var10;
         if (var7 != null) {
            boolean var12;
            int var15;
            int var16;
            if (zapb.c(var1)) {
               var4 = com.aspose.cells.b.a.zo.a(var1);
               boolean var11 = false;
               var12 = false;
               var10 = var7.a(var4);
               int[] var13 = a(var0, var4, var10.i(), (String)null, var2, true);
               var9 = var13 != null;
               if (var9) {
                  var15 = var13[0];
                  var16 = var13[1];
                  var5 = var0.q().a(var4, var15, var16, true);
               }
            } else {
               for(var15 = 0; var15 < var7.getCount(); ++var15) {
                  var10 = var7.a(var15);
                  if (var10.h()) {
                     var12 = false;
                     boolean var17 = false;
                     int[] var14 = a(var0, var15, var1, var8, var2, false);
                     var9 = var14 != null;
                     if (var9) {
                        var16 = var14[0];
                        int var18 = var14[1];
                        var4 = var15;
                        var5 = var0.q().a(var15, var16, var18, true);
                        break;
                     }
                  }
               }
            }
         }

         if (!var9) {
            if (var0.v() == null) {
               var0.a(new zbqf());
               var10 = new zbqg();
               var10.a(1);
               var0.v().a(var10);
            }

            var10 = new zbqg();
            var10.a(0);
            var10.d(var1);
            var4 = var0.v().getCount();
            var0.v().a(var10);
            if (var2 != null && !"".equals(var2)) {
               var10.a(new String[]{var2});
               var5 = var0.q().b(var0.v().getCount() - 1, 0, 0);
            } else {
               var10.a(new String[]{var6});
               var5 = var0.q().b(var0.v().getCount() - 1, 0, 0);
            }
         }

         return new int[]{var4, var5};
      }
   }

   private static int[] a(WorksheetCollection var0, int var1, String var2, String var3, String var4, boolean var5) {
      zbqg var6 = var0.v().a(var1);
      int var7 = 0;
      int var8 = 0;
      if (!var5 && com.aspose.cells.b.a.zv.a(var6.i(), var2, true) != 0 && com.aspose.cells.b.a.zv.a(var6.k(), var3, true) != 0) {
         return null;
      } else {
         boolean var9 = false;
         int var10;
         if (var4 != null && !"".equals(var4)) {
            var4 = var4.toUpperCase();
            var10 = var4.indexOf(58);
            if (var10 != -1) {
               String[] var13 = com.aspose.cells.b.a.zv.d(var4, ':');

               for(int var12 = 0; var12 < var6.c().length; ++var12) {
                  if (com.aspose.cells.b.a.zv.b(var6.c()[var12].toUpperCase(), var13[0].toUpperCase())) {
                     var7 = var12;
                     var9 = true;
                  }

                  if (com.aspose.cells.b.a.zv.b(var6.c()[var12].toUpperCase(), var13[1].toUpperCase())) {
                     var8 = var12;
                     var9 = true;
                  }
               }
            } else {
               for(int var11 = 0; var11 < var6.c().length; ++var11) {
                  if (com.aspose.cells.b.a.zv.b(var6.c()[var11].toUpperCase(), var4.toUpperCase())) {
                     var8 = var11;
                     var7 = var11;
                     var9 = true;
                     break;
                  }
               }
            }

            if (!var9) {
               var6.a(var4);
               var7 = var6.c().length - 1;
               var0.q().b(var1, var7, var8);
            }
         } else {
            var10 = var0.q().b(var1 & '\uffff', 65534);
            if (var10 == -1) {
               var0.q().b(var1, 65534, 65534);
            }

            var8 = 65534;
            var7 = 65534;
         }

         return new int[]{var7, var8};
      }
   }

   public static boolean c(String var0) {
      int var1 = 0;
      int var2 = 0;

      while(var2 < var0.length()) {
         switch(var0.charAt(var2)) {
         case ' ':
         case '!':
         case '#':
         case '$':
         case '%':
         case '&':
         case '\'':
         case '(':
         case ')':
         case '+':
         case ',':
         case '-':
         case '/':
         case '<':
         case '=':
         case '>':
         case '@':
         case '\\':
         case '{':
         case '|':
         case '}':
         case '~':
            return true;
         case '0':
         case '1':
         case '2':
         case '3':
         case '4':
         case '5':
         case '6':
         case '7':
         case '8':
         case '9':
            if (var2 == 0) {
               return true;
            }

            ++var1;
         case '"':
         case '*':
         case '.':
         case ':':
         case ';':
         case '?':
         case 'A':
         case 'B':
         case 'C':
         case 'D':
         case 'E':
         case 'F':
         case 'G':
         case 'H':
         case 'I':
         case 'J':
         case 'K':
         case 'L':
         case 'M':
         case 'N':
         case 'O':
         case 'P':
         case 'Q':
         case 'R':
         case 'S':
         case 'T':
         case 'U':
         case 'V':
         case 'W':
         case 'X':
         case 'Y':
         case 'Z':
         case '[':
         case ']':
         case '^':
         case '_':
         case '`':
         case 'a':
         case 'b':
         case 'c':
         case 'd':
         case 'e':
         case 'f':
         case 'g':
         case 'h':
         case 'i':
         case 'j':
         case 'k':
         case 'l':
         case 'm':
         case 'n':
         case 'o':
         case 'p':
         case 'q':
         case 'r':
         case 's':
         case 't':
         case 'u':
         case 'v':
         case 'w':
         case 'x':
         case 'y':
         case 'z':
         default:
            ++var2;
         }
      }

      return var1 == var0.length();
   }

   static boolean a(zabd var0) {
      zabd var1 = var0.c();
      if (var1 == null) {
         return true;
      } else if (var1.i() != 3 && var1.i() != 5) {
         return true;
      } else if (var1.i() != 3) {
         return false;
      } else {
         int var2;
         for(var2 = 0; var2 < var1.d().size() && var1.d().get(var2) != var0; ++var2) {
            ;
         }

         boolean var3 = true;
         int var5;
         switch(var1.f()[0]) {
         case 33:
         case 65:
         case 97:
            var5 = com.aspose.cells.b.a.zc.e(var1.f(), 1) & '\uffff';
            break;
         case 34:
         case 66:
         case 98:
            var5 = com.aspose.cells.b.a.zc.e(var1.f(), 2) & '\uffff';
            break;
         default:
            return false;
         }

         int[] var4 = a(var5, 0, var0);
         if (var4 == null) {
            return false;
         } else if (var2 >= var4.length) {
            return var4[var4.length - 1] == 64;
         } else {
            return var4[var2] == 64;
         }
      }
   }

   static Object[][] a(double[][] var0) {
      Object[][] var1 = new Object[var0.length][];

      for(int var2 = 0; var2 < var0.length; ++var2) {
         if (var0[var2] != null) {
            var1[var2] = new Object[var0[var2].length];

            for(int var3 = 0; var3 < var0[var2].length; ++var3) {
               var1[var2][var3] = var0[var2][var3];
            }
         }
      }

      return var1;
   }

   static Object a(Workbook var0, Object var1, boolean var2, WorkbookSettings var3) {
      if (var1 == null) {
         return 0.0D;
      } else if (var1 instanceof zst) {
         return var1;
      } else {
         switch(zamo.a(var1.getClass())) {
         case 3:
            if (!var2 && (Boolean)var1) {
               return 1.0D;
            }

            return 0.0D;
         case 4:
         case 5:
         case 6:
         case 8:
         case 10:
         case 11:
         case 12:
         case 13:
         case 15:
         case 17:
         default:
            int var8;
            int var9;
            double var16;
            if (var1 instanceof double[][]) {
               var16 = 0.0D;
               double[][] var17 = (double[][])((double[][])var1);
               int var18 = var17[0].length;

               for(var8 = 0; var8 < var17.length; ++var8) {
                  if (var17[var8] != null) {
                     for(var9 = 0; var9 < var18; ++var9) {
                        var16 += var17[var8][var9];
                     }
                  }
               }

               return var16;
            } else if (!(var1 instanceof Object[])) {
               return 0.0D;
            } else {
               var16 = 0.0D;
               Object[] var6 = (Object[])((Object[])var1);
               Object[] var7 = var6;
               var8 = var6.length;

               for(var9 = 0; var9 < var8; ++var9) {
                  Object var10 = var7[var9];
                  if (var10 instanceof Double) {
                     var16 += (Double)var10;
                  } else if (var10 instanceof Object[]) {
                     Object[] var11 = (Object[])((Object[])var10);
                     Object[] var12 = var11;
                     int var13 = var11.length;

                     for(int var14 = 0; var14 < var13; ++var14) {
                        Object var15 = var12[var14];
                        if (var15 instanceof Double) {
                           var16 += (Double)var15;
                        }
                     }
                  }
               }

               return var16;
            }
         case 7:
            return (double)(Short)var1;
         case 9:
            return (double)(Integer)var1;
         case 14:
            return (Double)var1;
         case 16:
            return CellsHelper.getDoubleFromDateTime((DateTime)var1, var0.getSettings().getDate1904());
         case 18:
            if (var2) {
               return 0.0D;
            } else {
               String var4 = (String)var1;
               zati var5 = zyc.a(var4, var3.e());
               if (var5 == null) {
                  return zst.i;
               } else {
                  switch(var5.a()) {
                  case 1:
                     return CellsHelper.getDoubleFromDateTime((DateTime)var5.d(), var3.getDate1904());
                  case 4:
                     return (Double)var5.d();
                  default:
                     return zst.i;
                  }
               }
            }
         }
      }
   }

   static Object a(Object var0, boolean var1, boolean var2) {
      if (var0 instanceof double[][]) {
         return var0;
      } else {
         double[][] var3;
         if (var0 instanceof Object[][]) {
            Object[][] var4 = (Object[][])((Object[][])var0);
            var3 = new double[var4.length][];

            for(int var5 = 0; var5 < var4.length; ++var5) {
               if (var4[var5] != null) {
                  var3[var5] = new double[var4[var5].length];

                  for(int var6 = 0; var6 < var4[var5].length; ++var6) {
                     Object var7 = var4[var5][var6];
                     if (var7 instanceof zst) {
                        if (var2) {
                           return var7;
                        }
                     } else if (var7 instanceof Double) {
                        var3[var5][var6] = (Double)var7;
                     } else if (var7 instanceof Boolean) {
                        var3[var5][var6] = (Boolean)var7 ? 1.0D : 0.0D;
                     }
                  }
               }
            }
         } else {
            var3 = new double[1][];
            Object var8 = e(var0, var1);
            if (var8 instanceof Double) {
               var3[0] = new double[]{(Double)var8};
            } else {
               var3[0] = new double[1];
            }
         }

         return var3;
      }
   }

   static double[][] a(Object var0, boolean var1) {
      if (var0 instanceof double[][]) {
         return (double[][])((double[][])var0);
      } else {
         double[][] var2;
         Object var3;
         if (var0 instanceof Object[]) {
            var3 = com.aspose.cells.b.a.za.a((Object[])((Object[])((Object[])var0)), 0);
            Object[] var4;
            int var6;
            if (var3 instanceof Object[]) {
               var4 = (Object[])((Object[])var0);
               Object[] var5 = (Object[])((Object[])var3);
               var6 = var4.length;
               int var7 = var5.length;
               var2 = new double[var6][];

               for(int var8 = 0; var8 < var6; ++var8) {
                  var2[var8] = new double[var7];
                  var5 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var4, var8));

                  for(int var9 = 0; var9 < var7; ++var9) {
                     Object var10 = com.aspose.cells.b.a.za.a(var5, var9);
                     if (var10 instanceof Double) {
                        var2[var8][var9] = (Double)var10;
                     } else if (var10 instanceof Boolean) {
                        var2[var8][var9] = (Boolean)var10 ? 1.0D : 0.0D;
                     }
                  }
               }
            } else {
               var4 = (Object[])((Object[])var0);
               int var11 = var4.length;
               var2 = new double[][]{new double[var11]};

               for(var6 = 0; var6 < var11; ++var6) {
                  Object var12 = com.aspose.cells.b.a.za.a(var4, var6);
                  if (var12 instanceof Double) {
                     var2[0][var6] = (Double)var12;
                  }
               }
            }
         } else {
            var2 = new double[1][];
            var3 = e(var0, var1);
            if (var3 instanceof Double) {
               var2[0] = new double[]{(Double)var3};
            } else {
               var2[0] = new double[1];
            }
         }

         return var2;
      }
   }

   static Object b(Object var0, boolean var1) {
      if (var0 == null) {
         return null;
      } else if (var0 instanceof zst) {
         return var0;
      } else if (var0 instanceof double[][]) {
         return var0;
      } else {
         double[][] var2;
         Object var3;
         if (!(var0 instanceof Object[])) {
            var3 = e(var0, var1);
            if (var3 instanceof zst) {
               return var3;
            } else {
               var2 = new double[][]{{(Double)var3}};
               return var2;
            }
         } else {
            if (var0 instanceof Object[]) {
               var3 = com.aspose.cells.b.a.za.a((Object[])((Object[])((Object[])var0)), 0);
               if (var3 instanceof Object[]) {
                  Object[] var4 = (Object[])((Object[])var0);
                  Object[] var5 = (Object[])((Object[])var3);
                  int var6 = var4.length;
                  int var7 = var5.length;
                  var2 = new double[var6][];

                  for(int var8 = 0; var8 < var6; ++var8) {
                     var2[var8] = new double[var7];
                     var5 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var4, var8));

                     for(int var9 = 0; var9 < var7; ++var9) {
                        Object var10 = com.aspose.cells.b.a.za.a(var5, var9);
                        if (var10 instanceof Double) {
                           var2[var8][var9] = (Double)var10;
                        }
                     }
                  }
               } else {
                  var2 = new double[][]{(double[])((double[])var0)};
               }
            } else {
               var2 = new double[1][];
               var3 = e(var0, var1);
               if (var3 instanceof Double) {
                  var2[0] = new double[]{(Double)var3};
               } else {
                  var2[0] = new double[1];
               }
            }

            return var2;
         }
      }
   }

   static Object a(Object var0, Object var1, WorkbookSettings var2) {
      if (var0 == null) {
         return null;
      } else if (var0 instanceof zst) {
         return var0;
      } else {
         Object[][] var3 = (Object[][])null;
         if (var0 instanceof Object[][]) {
            var3 = (Object[][])((Object[][])var0);
         } else {
            var3 = new Object[][]{{var0}};
         }

         if (var1 == null) {
            return null;
         } else if (var1 instanceof zst) {
            return var1;
         } else {
            Object[][] var4 = (Object[][])null;
            if (var1 instanceof Object[][]) {
               var4 = (Object[][])((Object[][])var1);
            } else {
               var4 = new Object[][]{{var1}};
            }

            int var5 = var3.length;
            int var6 = var3[0].length;
            Object[][] var7;
            int var8;
            if (var5 == 1) {
               if (var4.length != 1 && var4[0].length == 1) {
                  var7 = new Object[][]{new Object[var4.length]};

                  for(var8 = 0; var8 < var4.length; ++var8) {
                     if (var4[var8] != null) {
                        var7[0][var8] = var4[var8][0];
                     }
                  }

                  var4 = var7;
               }
            } else if (var4.length == 1 && var3[0].length == 1) {
               if (var4[0].length != var5) {
                  return zst.c;
               }

               var7 = new Object[var5][];

               for(var8 = 0; var8 < var5; ++var8) {
                  var7[var8][0] = new Object[]{var4[0][var8]};
               }

               var4 = var7;
            }

            if (var3.length == var4.length && var3[0].length == var4[0].length) {
               ArrayList var12 = new ArrayList();
               ArrayList var13 = new ArrayList();

               for(int var9 = 0; var9 < var5; ++var9) {
                  if (var3[var9] != null && var4[var9] != null) {
                     for(int var10 = 0; var10 < var6; ++var10) {
                        if (var3[var9][var10] != null && var4[var9][var10] != null) {
                           if (var3[var9][var10] instanceof zst) {
                              return var3[var9][var10];
                           }

                           if (var4[var9][var10] instanceof zst) {
                              return var4[var9][var10];
                           }

                           if (var3[var9][var10] instanceof Double && var4[var9][var10] instanceof Double) {
                              com.aspose.cells.b.a.a.ze.a(var12, var3[var9][var10]);
                              com.aspose.cells.b.a.a.ze.a(var13, var4[var9][var10]);
                           }
                        }
                     }
                  }
               }

               double[] var14 = new double[var12.size()];
               double[] var15 = new double[var13.size()];

               for(int var11 = 0; var11 < var12.size(); ++var11) {
                  var14[var11] = (Double)var12.get(var11);
                  var15[var11] = (Double)var13.get(var11);
               }

               return new Object[]{var14, var15};
            } else {
               return zst.c;
            }
         }
      }
   }

   static Object a(Object var0, Cell var1, boolean var2, boolean var3) {
      if (var0 instanceof zst) {
         return var0;
      } else {
         int var8;
         if (var0 instanceof double[][]) {
            double[][] var14 = (double[][])((double[][])var0);
            int var15 = var14[0].length;
            double[] var16 = new double[var14.length * var15];

            for(int var17 = 0; var17 < var14.length; ++var17) {
               if (var14[var17] != null) {
                  for(var8 = 0; var8 < var14[var17].length; ++var8) {
                     var16[var17 * var15 + var8] = var14[var17][var8];
                  }
               }
            }

            return var16;
         } else if (!(var0 instanceof Object[])) {
            Object var13 = e(var0, var2);
            return var13 instanceof zst ? var13 : new double[]{(Double)var13};
         } else {
            Object var5 = com.aspose.cells.b.a.za.a((Object[])((Object[])((Object[])var0)), 0);
            double[] var4;
            if (var5 instanceof Object[]) {
               Object[] var6 = (Object[])((Object[])var0);
               Object[] var7 = (Object[])((Object[])var5);
               var8 = var6.length;
               int var9 = var7.length;
               var4 = new double[var8 * var9];

               for(int var10 = 0; var10 < var8; ++var10) {
                  var7 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var6, var10));

                  for(int var11 = 0; var11 < var9; ++var11) {
                     Object var12 = com.aspose.cells.b.a.za.a(var7, var11);
                     if (var12 instanceof Double) {
                        var4[var10 * var9 + var11] = (Double)var12;
                     } else if (var12 instanceof zst && !var3) {
                        return var12;
                     }
                  }
               }
            } else {
               var4 = (double[])((double[])var0);
            }

            return var4;
         }
      }
   }

   static Object a(ArrayList var0, Object var1, Cell var2, boolean var3) {
      if (var1 instanceof zst) {
         return var1;
      } else {
         int var7;
         int var15;
         if (var1 instanceof double[][]) {
            double[][] var12 = (double[][])((double[][])var1);
            int var14 = var12[0].length;

            for(var15 = 0; var15 < var12.length; ++var15) {
               if (var12[var15] != null) {
                  for(var7 = 0; var7 < var14; ++var7) {
                     com.aspose.cells.b.a.a.ze.a(var0, (Object)var12[var15][var7]);
                  }
               }
            }

            return null;
         } else {
            Object var4;
            if (var1 instanceof Object[]) {
               var4 = com.aspose.cells.b.a.za.a((Object[])((Object[])((Object[])var1)), 0);
               if (var4 instanceof Object[]) {
                  Object[] var5 = (Object[])((Object[])var1);
                  Object[] var6 = (Object[])((Object[])var4);
                  var7 = var5.length;
                  int var8 = var6.length;

                  for(int var9 = 0; var9 < var7; ++var9) {
                     var6 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var5, var9));
                     if (var6 != null) {
                        for(int var10 = 0; var10 < var8; ++var10) {
                           Object var11 = com.aspose.cells.b.a.za.a(var6, var10);
                           if (var11 instanceof Double) {
                              com.aspose.cells.b.a.a.ze.a(var0, var11);
                           }
                        }
                     }
                  }
               } else {
                  double[] var13 = (double[])((double[])var1);

                  for(var15 = 0; var15 < var13.length; ++var15) {
                     com.aspose.cells.b.a.a.ze.a(var0, (Object)var13[var15]);
                  }
               }
            } else {
               var4 = e(var1, var3);
               if (var4 instanceof zst) {
                  return var4;
               }

               com.aspose.cells.b.a.a.ze.a(var0, var4);
            }

            return null;
         }
      }
   }

   static Object a(ArrayList var0, Object var1, Cell var2, boolean var3, boolean var4, boolean var5, boolean var6, boolean var7, boolean var8) {
      if (var1 instanceof zst) {
         return var1;
      } else {
         int var12;
         int var20;
         if (var1 instanceof double[][]) {
            double[][] var17 = (double[][])((double[][])var1);
            int var19 = var17[0].length;

            for(var20 = 0; var20 < var17.length; ++var20) {
               if (var17[var20] != null) {
                  for(var12 = 0; var12 < var19; ++var12) {
                     com.aspose.cells.b.a.a.ze.a(var0, (Object)var17[var20][var12]);
                  }
               }
            }

            return null;
         } else {
            Object var9;
            if (var1 instanceof Object[]) {
               var9 = com.aspose.cells.b.a.za.a((Object[])((Object[])((Object[])var1)), 0);
               if (var9 instanceof Object[]) {
                  Object[] var10 = (Object[])((Object[])var1);
                  Object[] var11 = (Object[])((Object[])var9);
                  var12 = var10.length;
                  int var13 = var11.length;

                  for(int var14 = 0; var14 < var12; ++var14) {
                     var11 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var10, var14));

                     for(int var15 = 0; var15 < var13; ++var15) {
                        Object var16 = com.aspose.cells.b.a.za.a(var11, var15);
                        if (var16 == null) {
                           if (!var5) {
                              com.aspose.cells.b.a.a.ze.a(var0, (Object)0.0D);
                           }
                        } else if (var16 instanceof zst) {
                           if (!var6) {
                              com.aspose.cells.b.a.a.ze.a(var0, (Object)0.0D);
                           }

                           if (!var8) {
                              return var16;
                           }
                        } else {
                           switch(zamo.a(var16.getClass())) {
                           case 3:
                              if (!var3) {
                                 com.aspose.cells.b.a.a.ze.a(var0, (Object)((Boolean)var16 ? 1.0D : 0.0D));
                              }
                              break;
                           case 9:
                              com.aspose.cells.b.a.a.ze.a(var0, (Object)((double)(Integer)var16));
                              break;
                           case 14:
                              com.aspose.cells.b.a.a.ze.a(var0, var16);
                              break;
                           case 16:
                              com.aspose.cells.b.a.a.ze.a(var0, (Object)CellsHelper.getDoubleFromDateTime((DateTime)var16, var7));
                              break;
                           case 18:
                              if (!var4) {
                                 com.aspose.cells.b.a.a.ze.a(var0, (Object)0.0D);
                              }
                           }
                        }
                     }
                  }
               } else {
                  double[] var18 = (double[])((double[])var1);

                  for(var20 = 0; var20 < var18.length; ++var20) {
                     com.aspose.cells.b.a.a.ze.a(var0, (Object)var18[var20]);
                  }
               }
            } else {
               var9 = e(var1, var7);
               if (var9 instanceof zst) {
                  return var9;
               }

               com.aspose.cells.b.a.a.ze.a(var0, var9);
            }

            return null;
         }
      }
   }

   static Object a(Object var0, Cell var1, boolean var2) {
      if (var0 instanceof zst) {
         return var0;
      } else {
         int var7;
         int var17;
         if (var0 instanceof double[][]) {
            double[][] var13 = (double[][])((double[][])var0);
            int var14 = var13[0].length;
            DateTime[] var16 = new DateTime[var13.length * var14];

            for(var17 = 0; var17 < var13.length; ++var17) {
               if (var13[var17] != null) {
                  for(var7 = 0; var7 < var14; ++var7) {
                     var16[var17 * var14 + var7] = CellsHelper.getDateTimeFromDouble(var13[var17][var7], var2);
                  }
               }
            }

            return var16;
         } else if (!(var0 instanceof Object[])) {
            Object var12 = e(var0, var2);
            return var12 instanceof zst ? var12 : new DateTime[]{CellsHelper.getDateTimeFromDouble((Double)var12, var2)};
         } else {
            Object var4 = com.aspose.cells.b.a.za.a((Object[])((Object[])((Object[])var0)), 0);
            DateTime[] var3;
            if (var4 instanceof Object[]) {
               Object[] var5 = (Object[])((Object[])var0);
               Object[] var6 = (Object[])((Object[])var4);
               var7 = var5.length;
               int var8 = var6.length;
               var3 = new DateTime[var7 * var8];

               for(int var9 = 0; var9 < var7; ++var9) {
                  var6 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var5, var9));

                  for(int var10 = 0; var10 < var8; ++var10) {
                     Object var11 = e(com.aspose.cells.b.a.za.a(var6, var10), var2);
                     if (var11 instanceof zst) {
                        return var11;
                     }

                     var3[var9 * var8 + var10] = CellsHelper.getDateTimeFromDouble((Double)var11, var2);
                  }
               }
            } else {
               double[] var15 = (double[])((double[])var0);
               var3 = new DateTime[var15.length];

               for(var17 = 0; var17 < var15.length; ++var17) {
                  var3[var17] = CellsHelper.getDateTimeFromDouble(var15[var17], var2);
               }
            }

            return var3;
         }
      }
   }

   static String[] d(String var0) {
      if (var0.indexOf(39) == -1) {
         return com.aspose.cells.b.a.zv.d(var0, ',');
      } else {
         ArrayList var1 = new ArrayList();
         char[] var2 = var0.toCharArray();
         boolean var3 = false;
         int var4 = 0;

         for(int var5 = 0; var5 < var2.length; ++var5) {
            char var6 = var2[var5];
            if (var6 == '\'') {
               if (var3 && var5 + 1 < var2.length && var2[var5 + 1] == '\'') {
                  continue;
               }

               var3 = !var3;
            }

            if (!var3 && var6 == ',') {
               com.aspose.cells.b.a.a.ze.a(var1, (Object)(new String(var2, var4, var5 - var4)));
               var4 = var5 + 1;
            }
         }

         if (var1.size() == 0) {
            return null;
         } else {
            com.aspose.cells.b.a.a.ze.a(var1, (Object)(new String(var2, var4, var2.length - var4)));
            String[] var7 = new String[var1.size()];

            for(int var8 = 0; var8 < var1.size(); ++var8) {
               var7[var8] = (String)var1.get(var8);
            }

            return var7;
         }
      }
   }

   static Object c(Object var0, boolean var1) {
      if (var0 == null) {
         return false;
      } else if (var0 instanceof zst) {
         return var0;
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            return (Boolean)var0;
         case 14:
            return (Double)var0 != 0.0D;
         case 16:
            return CellsHelper.getDoubleFromDateTime((DateTime)var0, var1) != 0.0D;
         case 18:
            return "#VALUE!";
         default:
            return "#VALUE!";
         }
      }
   }

   static boolean a(byte var0) {
      switch(var0) {
      case 35:
      case 36:
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 43:
      case 44:
      case 45:
      case 46:
      case 47:
      case 57:
      case 58:
      case 59:
      case 60:
      case 61:
      case 67:
      case 68:
      case 69:
      case 70:
      case 71:
      case 72:
      case 73:
      case 74:
      case 75:
      case 76:
      case 77:
      case 78:
      case 79:
      case 89:
      case 90:
      case 91:
      case 92:
      case 93:
      case 99:
      case 100:
      case 101:
      case 102:
      case 103:
      case 104:
      case 105:
      case 106:
      case 107:
      case 108:
      case 109:
      case 110:
      case 111:
      case 121:
      case 122:
      case 123:
      case 124:
      case 125:
         return true;
      case 48:
      case 49:
      case 50:
      case 51:
      case 52:
      case 53:
      case 54:
      case 55:
      case 56:
      case 62:
      case 63:
      case 64:
      case 65:
      case 66:
      case 80:
      case 81:
      case 82:
      case 83:
      case 84:
      case 85:
      case 86:
      case 87:
      case 88:
      case 94:
      case 95:
      case 96:
      case 97:
      case 98:
      case 112:
      case 113:
      case 114:
      case 115:
      case 116:
      case 117:
      case 118:
      case 119:
      case 120:
      default:
         return false;
      }
   }

   static Object d(Object var0, boolean var1) {
      if (var0 == null) {
         return 0.0D;
      } else if (var0 instanceof zst) {
         return var0;
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            if ((Boolean)var0) {
               return 1.0D;
            }

            return 0.0D;
         case 14:
            return Math.floor((Double)var0);
         case 16:
            return Math.floor(CellsHelper.getDoubleFromDateTime((DateTime)var0, var1));
         case 18:
            String var2 = (String)var0;
            if (zapb.d(var2)) {
               try {
                  double var3 = com.aspose.cells.b.a.zn.a(var2);
                  return Math.floor(var3);
               } catch (Exception var5) {
                  return zst.i;
               }
            }

            return zst.i;
         default:
            return var0 instanceof Object[] ? zba.a(var0, var1) : zst.i;
         }
      }
   }

   static boolean a(Object[] var0, Object[] var1) {
      if (var0.length != 1) {
         return false;
      } else {
         Object[] var2 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var0, 0));
         if (var2.length != 1) {
            return false;
         } else {
            var1[0] = com.aspose.cells.b.a.za.a((Object[])var2, 0);
            return true;
         }
      }
   }

   static int a(int var0, int var1) {
      switch(var0) {
      case 1:
         return 32;
      case 252:
         return 96;
      default:
         return 64;
      }
   }

   static int[] a(int var0, int var1, zabd var2) {
      switch(var0) {
      case 0:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 12:
      case 36:
      case 37:
      case 40:
      case 41:
      case 42:
      case 43:
      case 44:
      case 45:
      case 46:
      case 47:
      case 75:
      case 76:
      case 77:
      case 105:
      case 130:
      case 131:
      case 169:
      case 183:
      case 191:
      case 193:
      case 194:
      case 195:
      case 196:
      case 199:
      case 227:
      case 235:
      case 269:
      case 318:
      case 319:
      case 320:
      case 321:
      case 322:
      case 323:
      case 347:
      case 360:
      case 361:
      case 362:
      case 363:
      case 364:
      case 365:
      case 366:
      case 367:
         return zabl.h;
      case 1:
         switch(var1) {
         case 1:
            return new int[]{96, 32};
         default:
            return zabl.n;
         }
      case 2:
      case 3:
      case 13:
      case 14:
      case 15:
      case 16:
      case 17:
      case 18:
      case 20:
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
      case 26:
      case 27:
      case 30:
      case 31:
      case 32:
      case 33:
      case 38:
      case 39:
      case 48:
      case 56:
      case 57:
      case 58:
      case 59:
      case 60:
      case 65:
      case 66:
      case 67:
      case 68:
      case 69:
      case 70:
      case 71:
      case 72:
      case 73:
      case 82:
      case 86:
      case 97:
      case 98:
      case 99:
      case 109:
      case 111:
      case 112:
      case 113:
      case 114:
      case 115:
      case 116:
      case 117:
      case 118:
      case 119:
      case 120:
      case 121:
      case 124:
      case 126:
      case 127:
      case 128:
      case 129:
      case 140:
      case 141:
      case 142:
      case 143:
      case 144:
      case 148:
      case 162:
      case 167:
      case 168:
      case 184:
      case 192:
      case 197:
      case 198:
      case 204:
      case 205:
      case 206:
      case 207:
      case 208:
      case 209:
      case 210:
      case 211:
      case 212:
      case 213:
      case 214:
      case 215:
      case 219:
      case 220:
      case 222:
      case 229:
      case 230:
      case 231:
      case 232:
      case 233:
      case 234:
      case 244:
      case 247:
      case 261:
      case 270:
      case 271:
      case 272:
      case 273:
      case 274:
      case 275:
      case 276:
      case 277:
      case 278:
      case 279:
      case 280:
      case 281:
      case 282:
      case 283:
      case 284:
      case 285:
      case 286:
      case 287:
      case 288:
      case 289:
      case 290:
      case 291:
      case 292:
      case 293:
      case 294:
      case 295:
      case 296:
      case 297:
      case 298:
      case 299:
      case 300:
      case 301:
      case 302:
      case 332:
      case 336:
      case 337:
      case 342:
      case 343:
      case 350:
      case 351:
      case 352:
      case 353:
      case 354:
      case 359:
         return zabl.g;
      case 10:
      case 19:
      case 34:
      case 35:
      case 53:
      case 54:
      case 55:
      case 63:
      case 74:
      case 79:
      case 80:
      case 81:
      case 84:
      case 85:
      case 87:
      case 88:
      case 89:
      case 90:
      case 91:
      case 92:
      case 93:
      case 94:
      case 95:
      case 96:
      case 103:
      case 104:
      case 106:
      case 107:
      case 108:
      case 110:
      case 122:
      case 123:
      case 132:
      case 133:
      case 134:
      case 135:
      case 136:
      case 137:
      case 138:
      case 139:
      case 145:
      case 146:
      case 147:
      case 149:
      case 150:
      case 151:
      case 152:
      case 153:
      case 154:
      case 155:
      case 156:
      case 157:
      case 158:
      case 159:
      case 160:
      case 161:
      case 166:
      case 170:
      case 171:
      case 172:
      case 173:
      case 174:
      case 175:
      case 176:
      case 177:
      case 178:
      case 179:
      case 180:
      case 181:
      case 182:
      case 185:
      case 186:
      case 187:
      case 188:
      case 189:
      case 190:
      case 200:
      case 201:
      case 202:
      case 203:
      case 217:
      case 218:
      case 221:
      case 223:
      case 224:
      case 225:
      case 226:
      case 236:
      case 237:
      case 238:
      case 239:
      case 240:
      case 241:
      case 242:
      case 243:
      case 245:
      case 246:
      case 248:
      case 249:
      case 250:
      case 251:
      case 253:
      case 254:
      case 255:
      case 256:
      case 257:
      case 258:
      case 259:
      case 260:
      case 262:
      case 263:
      case 264:
      case 265:
      case 266:
      case 267:
      case 268:
      case 333:
      case 334:
      case 335:
      case 338:
      case 339:
      case 340:
      case 341:
      case 348:
      case 349:
      case 355:
      case 356:
      case 357:
      case 358:
      default:
         return null;
      case 11:
      case 64:
      case 100:
      case 125:
      case 344:
         return zabl.n;
      case 28:
         return zabl.r;
      case 29:
         if (var2.d() != null && var2.d().size() >= 2 && ((zabd)var2.d().get(0)).i() == 2) {
            return zabl.j;
         }

         return zabl.l;
      case 49:
      case 51:
         return new int[]{32, 32, 64};
      case 50:
      case 52:
         return new int[]{32, 32, 32, 64};
      case 61:
      case 62:
      case 78:
      case 324:
      case 325:
      case 326:
      case 327:
      case 328:
      case 329:
      case 331:
      case 346:
         return zabl.l;
      case 83:
      case 163:
      case 164:
      case 165:
      case 228:
      case 252:
      case 303:
      case 304:
      case 305:
      case 306:
      case 307:
      case 308:
      case 310:
      case 311:
      case 312:
      case 313:
      case 314:
      case 315:
      case 330:
         return zabl.i;
      case 101:
      case 102:
         return new int[]{64, 32, 32, 64};
      case 216:
         return new int[]{64, 32, 64};
      case 309:
         return new int[]{64, 96};
      case 316:
      case 317:
         return new int[]{96, 96, 64};
      case 345:
         return new int[]{32, 64, 32};
      }
   }

   static Object a(Object var0) {
      if (var0 instanceof zst) {
         return var0;
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            if ((Boolean)var0) {
               return "TRUE";
            }

            return "FALSE";
         default:
            return com.aspose.cells.b.a.zr.a(var0);
         }
      }
   }

   static Object a(Object var0, WorkbookSettings var1) {
      return a(var0, var1, false);
   }

   static Object a(Object var0, WorkbookSettings var1, boolean var2) {
      if (var0 == null) {
         return 0.0D;
      } else if (var0 instanceof zst) {
         return var0;
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            if ((Boolean)var0) {
               return zml.h;
            }

            return zml.g;
         case 4:
         case 5:
         case 6:
         case 8:
         case 10:
         case 11:
         case 12:
         case 13:
         case 15:
         case 17:
         default:
            if (var0 instanceof double[][]) {
               double[][] var8 = (double[][])((double[][])var0);
               if (var8.length == 1 && var8[0].length == 1) {
                  return var8[0][0];
               }

               return zst.i;
            } else {
               if (var0 instanceof Object[]) {
                  Object var5 = null;
                  Object[] var6 = new Object[]{var5};
                  boolean var7 = a((Object[])((Object[])var0), var6);
                  var5 = var6[0];
                  if (var7) {
                     return e(var5, var1.getDate1904());
                  }
               }

               return zst.i;
            }
         case 7:
            return (double)(Short)var0;
         case 9:
            return (double)(Integer)var0;
         case 14:
            return (Double)var0;
         case 16:
            return CellsHelper.getDoubleFromDateTime((DateTime)var0, var1.getDate1904());
         case 18:
            if (var2) {
               return zml.g;
            } else {
               String var3 = (String)var0;
               zati var4 = zyc.a(var3, var1.e());
               if (var4 == null) {
                  return zst.i;
               } else {
                  switch(var4.a()) {
                  case 1:
                     return CellsHelper.getDoubleFromDateTime((DateTime)var4.d(), var1.getDate1904());
                  case 4:
                     return (Double)var4.d();
                  default:
                     return zst.i;
                  }
               }
            }
         }
      }
   }

   static Object e(Object var0, boolean var1) {
      if (var0 == null) {
         return 0.0D;
      } else if (var0 instanceof zst) {
         return var0;
      } else {
         DateTime var5;
         switch(zamo.a(var0.getClass())) {
         case 3:
            if ((Boolean)var0) {
               return 1.0D;
            }

            return 0.0D;
         case 4:
         case 5:
         case 6:
         case 8:
         case 10:
         case 11:
         case 12:
         case 13:
         case 15:
         case 17:
         default:
            if (var0 instanceof double[][]) {
               double[][] var10 = (double[][])((double[][])var0);
               if (var10.length == 1 && var10[0].length == 1) {
                  return var10[0][0];
               }

               return zst.i;
            } else {
               if (var0 instanceof Object[]) {
                  var5 = null;
                  Object[] var6 = new Object[]{var5};
                  boolean var7 = a((Object[])((Object[])var0), var6);
                  Object var9 = var6[0];
                  if (var7) {
                     return e(var9, var1);
                  }
               }

               return zst.i;
            }
         case 7:
            return (double)(Short)var0;
         case 9:
            return (double)(Integer)var0;
         case 14:
            return (Double)var0;
         case 16:
            return CellsHelper.getDoubleFromDateTime((DateTime)var0, var1);
         case 18:
            String var2 = (String)var0;
            double var3 = 1.0D;
            if (var2.length() > 0 && var2.charAt(var2.length() - 1) == '%') {
               var2 = var2.substring(0, 0 + (var2.length() - 1)).trim();
               var3 = 0.01D;
            }

            if (var2.length() > 0) {
               switch(var2.charAt(0)) {
               case '$':
               case '€':
               case '￡':
               case '￥':
                  var2 = var2.substring(1).trim();
               }
            }

            if (zapb.d(var2)) {
               return com.aspose.cells.b.a.zn.a(var2) * var3;
            } else {
               if (zapb.a(var2.trim())) {
                  try {
                     var5 = DateTime.a(var2);
                     return CellsHelper.getDoubleFromDateTime(var5, var1) * var3;
                  } catch (Exception var8) {
                     ;
                  }
               }

               return zst.i;
            }
         }
      }
   }

   static Object f(Object var0, boolean var1) {
      if (var0 == null) {
         return 0.0D;
      } else if (var0 instanceof zst) {
         return var0;
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            if ((Boolean)var0) {
               return 1.0D;
            }

            return 0.0D;
         case 4:
         case 5:
         case 6:
         case 8:
         case 10:
         case 11:
         case 12:
         case 13:
         case 15:
         case 17:
         default:
            return 0.0D;
         case 7:
            return (double)(Short)var0;
         case 9:
            return (double)(Integer)var0;
         case 14:
            return (Double)var0;
         case 16:
            return CellsHelper.getDoubleFromDateTime((DateTime)var0, var1);
         case 18:
            return 0.0D;
         }
      }
   }

   static Object b(Object var0) {
      if (var0 == null) {
         return "";
      } else if (var0 instanceof zst) {
         return var0;
      } else if (var0 instanceof double[][]) {
         double[][] var1 = (double[][])((double[][])var0);
         return com.aspose.cells.b.a.zn.b(var1[0][0]);
      } else if (var0 instanceof Object[][]) {
         return b(((Object[][])((Object[][])var0))[0][0]);
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            return (Boolean)var0 ? "TRUE" : "FALSE";
         default:
            return com.aspose.cells.b.a.zr.a(var0);
         }
      }
   }

   static int a(Workbook var0, Object var1, boolean var2) {
      int var3 = -1;
      if (var1 instanceof Double) {
         var3 = (int)com.aspose.cells.a.c.zi.b(var1);
      } else if (var1 instanceof Integer) {
         var3 = (Integer)var1;
      }

      if (var2) {
         --var3;
      }

      return var3;
   }

   static void a(ArrayList var0, Object var1) {
      if (var1 != null) {
         if (var1 instanceof Object[]) {
            Object[] var2 = (Object[])((Object[])var1);

            for(int var3 = 0; var3 < var2.length; ++var3) {
               Object var4 = com.aspose.cells.b.a.za.a(var2, var3);
               if (var4 != null) {
                  if (var4 instanceof Object[]) {
                     Object[] var5 = (Object[])((Object[])var4);

                     for(int var6 = 0; var6 < var5.length; ++var6) {
                        Object var7 = com.aspose.cells.b.a.za.a(var5, var6);
                        if (var7 != null) {
                           com.aspose.cells.b.a.a.ze.a(var0, (Object)com.aspose.cells.b.a.zr.a(var7));
                        }
                     }
                  } else {
                     com.aspose.cells.b.a.a.ze.a(var0, (Object)com.aspose.cells.b.a.zr.a(var4));
                  }
               }
            }
         } else {
            com.aspose.cells.b.a.a.ze.a(var0, var1);
         }

      }
   }

   static void b(ArrayList var0, Object var1) {
      if (var1 != null) {
         if (var1 instanceof Object[]) {
            Object[] var2 = (Object[])((Object[])var1);
            Object var3 = com.aspose.cells.b.a.za.a((Object[])var2, 0);
            int var4;
            if (var3 instanceof Object[]) {
               for(var4 = 0; var4 < var2.length; ++var4) {
                  Object[] var5 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var2, var4));

                  for(int var6 = 0; var6 < var5.length; ++var6) {
                     com.aspose.cells.b.a.a.ze.a(var0, com.aspose.cells.b.a.za.a(var5, var6));
                  }
               }
            } else {
               for(var4 = 0; var4 < var2.length; ++var4) {
                  com.aspose.cells.b.a.a.ze.a(var0, com.aspose.cells.b.a.za.a(var2, var4));
               }
            }
         } else {
            com.aspose.cells.b.a.a.ze.a(var0, var1);
         }

      }
   }

   static boolean a(String var0, int[] var1, int[] var2) {
      var1[0] = var2[0] = 0;
      if (var0 != null && com.aspose.cells.b.a.zm.a(var0, 0) && com.aspose.cells.b.a.zm.b(var0, var0.length() - 1)) {
         var0 = var0.toUpperCase();
         var2[0] = 0;
         boolean var3 = false;

         int var6;
         for(var6 = 0; var6 < var0.length() && Character.isLetter(var0.charAt(var6)); ++var6) {
            var2[0] = var2[0] * 26 + var0.charAt(var6) - 65 + 1;
         }

         if (var2[0] > 0) {
            --var2[0];
         }

         try {
            var1[0] = com.aspose.cells.b.a.zo.a(var0.substring(var6));
            if (var1[0] > 0) {
               --var1[0];
            }
         } catch (Exception var5) {
            return false;
         }

         return var1[0] <= 1048575 && var2[0] <= 16383;
      } else {
         return false;
      }
   }
}
